package com.berchen.数据结构.二叉树.线索二叉树;


import lombok.Data;

@Data
public class TreeNode {

    private int id;
    private String name;
    private TreeNode left;
    private TreeNode right;
    private int leftType;   // 0 子节点  1 前驱节点
    private int rightType;  // 0 子节点  1 后继节点
    private TreeNode parent;    // 父亲节点 用于后序遍历线索二叉树

    public TreeNode(int id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Node{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
